#ifndef GAMEFIELD_H
#define GAMEFIELD_H

#define GET(type, var) protected: type var; public: type & get##var() { return var; }
#define SET(type, var) public: void set##var(type value) { var = value; }

#define GET_SET(type, var) GET(type, var) SET(type, var)

#include <QtGui>
#include "player.h"
#include "gametable.h"

class GameTable;

class GameField : public QWidget
{
    Q_OBJECT
protected:
    bool isSelected;

public:

    Player *owner;
    explicit GameField(QWidget *parent = 0);
    void paintEvent(QPaintEvent *);

    void enterEvent(QEvent *);
    void leaveEvent(QEvent *);

    void setIsSelected(bool value);
    bool getIsSelected() const;

    GET_SET(bool, isSquare)

    QPoint index;

signals:

public slots:

};

#endif // GAMEFIELD_H
